import React from 'react'

export default function Hello(props) {
  console.log(props)
  // 函数组件通过第一个参数props接受

  const clickHandle = () => {
    console.log('被点击了')
    props.fn()
  }

  return (
    <div>
      <h3 onClick={clickHandle}>我是函数组件</h3>
      <p>{props.info}</p>
      <p>{props.num}</p>
      <div>{props.children}</div>
    </div>
  )
}
